<!--{*
/*
 * This file is part of EC-CUBE
 *
 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
 *
 * http://www.lockon.co.jp/
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
*}-->

<div id="alpha">
<div id="alpha-inner">
<!--▼SUB NAVI-->
<!--{include file=$tpl_subnavi}-->
<!--▲SUB NAVI-->
</div>
</div>



<div id="beta">
<div id="beta-inner">
<form name="search_form" id="search_form" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->">
<input type="hidden" name="mode" value="search">

<div class="title_page">
<h2><!--{$tpl_subtitle}-->｜検索条件設定</h2>
</div>



<div class="menuclass">
<table summary="検索条件設定">
<tr>
	<th>受注番号</th>
	<td>
	<!--{assign var=key1 value="search_order_id1"}-->
	<!--{assign var=key2 value="search_order_id2"}-->
	<span class="red12"><!--{$arrErr[$key1]}--></span>
	<span class="red12"><!--{$arrErr[$key2]}--></span>
	<input type="text" name="<!--{$key1}-->" value="<!--{$arrForm[$key1].value|escape}-->" maxlength="<!--{$arrForm[$key1].length}-->" style="<!--{$arrErr[$key1]|sfGetErrorColor}-->"  size="6" class="box6" />
	 〜 
	<input type="text" name="<!--{$key2}-->" value="<!--{$arrForm[$key2].value|escape}-->" maxlength="<!--{$arrForm[$key2].length}-->" style="<!--{$arrErr[$key2]|sfGetErrorColor}-->"  size="6" class="box6" />
	</td>
	<th>対応状況</th>
	<td>
	<!--{assign var=key value="search_order_status"}-->
	<span class="red12"><!--{$arrErr[$key]}--></span>
	<select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
	<option value="">選択してください</option><!--{html_options options=$arrORDERSTATUS selected=$arrForm[$key].value}-->
	</select>
	</td>
</tr>
<tr>
	<th>顧客名</th>
	<td><!--{assign var=key value="search_order_name"}-->
		<span class="red12"><!--{$arrErr[$key]}--></span>
		<input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|escape}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" size="30" class="box30" />
	</td>
	<th>顧客名（カナ）</th>
	<td><!--{assign var=key value="search_order_kana"}-->
		<span class="red12"><!--{$arrErr[$key]}--></span>
		<input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|escape}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" size="30" class="box30" />
	</td>
</tr>
<tr>
	<th>メールアドレス</th>
	<td><!--{assign var=key value="search_order_email"}-->
		<span class="red12"><!--{$arrErr[$key]}--></span>
		<input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|escape}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" size="30" class="box30" />
	</td>
	<th>TEL</th>
	<td><!--{assign var=key value="search_order_tel"}-->
	<span class="red12"><!--{$arrErr[$key]}--></span>
	<input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|escape}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" size="30" class="box30" />
	</td>
</tr>
<tr>
	<th>生年月日</th>
	<td colspan="3">
	<span class="red"><!--{$arrErr.search_sbirthyear}--></span>
	<span class="red"><!--{$arrErr.search_ebirthyear}--></span>
									<select name="search_sbirthyear" style="<!--{$arrErr.search_sbirthyear|sfGetErrorColor}-->">
									<option value="">----</option>
									<!--{html_options options=$arrBirthYear selected=$arrForm.search_sbirthyear.value}-->
									</select>年
									<select name="search_sbirthmonth" style="<!--{$arrErr.search_sbirthyear|sfGetErrorColor}-->">
									<option value="">--</option>
									<!--{html_options options=$arrMonth selected=$arrForm.search_sbirthmonth.value}-->
									</select>月
									<select name="search_sbirthday" style="<!--{$arrErr.search_sbirthyear|sfGetErrorColor}-->">
									<option value="">--</option>
									<!--{html_options options=$arrDay selected=$arrForm.search_sbirthday.value}-->
									</select>日〜
									<select name="search_ebirthyear" style="<!--{$arrErr.search_ebirthyear|sfGetErrorColor}-->">
									<option value="">----</option>
									<!--{html_options options=$arrBirthYear selected=$arrForm.search_ebirthyear.value}-->
									</select>年
									<select name="search_ebirthmonth" style="<!--{$arrErr.search_ebirthyear|sfGetErrorColor}-->">
									<option value="">--</option>
									<!--{html_options options=$arrMonth selected=$arrForm.search_ebirthmonth.value}-->
									</select>月
									<select name="search_ebirthday" style="<!--{$arrErr.search_ebirthyear|sfGetErrorColor}-->">
									<option value="">--</option>
									<!--{html_options options=$arrDay selected=$arrForm.search_ebirthday.value}-->
									</select>日
	</td>
</tr>
<tr>
	<th>性別</th>
	<td colspan="3">
	<!--{assign var=key value="search_order_sex"}-->
	<span class="red12"><!--{$arrErr[$key]}--></span>
	<!--{html_checkboxes name="$key" options=$arrSex selected=$arrForm[$key].value}-->
	</td>
</tr>
<tr>
	<th>支払方法</th>
	<td colspan="3">
	<!--{assign var=key value="search_payment_id"}-->
	<span class="red12"><!--{$arrErr[$key]|escape}--></span>
	<!--{html_checkboxes name="$key" options=$arrPayment|escape selected=$arrForm[$key].value}-->
	</td>
</tr>
<tr>
	<th>受注日</th>
	<td colspan="3">
	<span class="red"><!--{$arrErr.search_startyear}--></span>
	<span class="red"><!--{$arrErr.search_endyear}--></span>
									<select name="search_sorderyear"  style="<!--{$arrErr.search_sorderyear|sfGetErrorColor}-->">
									<option value="">----</option>
									<!--{html_options options=$arrRegistYear selected=$arrForm.search_sorderyear.value}-->
									</select>年
									<select name="search_sordermonth" style="<!--{$arrErr.search_sorderyear|sfGetErrorColor}-->">
									<option value="">--</option>
									<!--{html_options options=$arrMonth selected=$arrForm.search_sordermonth.value}-->
									</select>月
									<select name="search_sorderday" style="<!--{$arrErr.search_sorderyear|sfGetErrorColor}-->">
									<option value="">--</option>
									<!--{html_options options=$arrDay selected=$arrForm.search_sorderday.value}-->
									</select>日〜
									<select name="search_eorderyear" style="<!--{$arrErr.search_eorderyear|sfGetErrorColor}-->">
									<option value="">----</option>
									<!--{html_options options=$arrRegistYear selected=$arrForm.search_eorderyear.value}-->
									</select>年
									<select name="search_eordermonth" style="<!--{$arrErr.search_eorderyear|sfGetErrorColor}-->">
									<option value="">--</option>
									<!--{html_options options=$arrMonth selected=$arrForm.search_eordermonth.value}-->
									</select>月
									<select name="search_eorderday" style="<!--{$arrErr.search_eorderyear|sfGetErrorColor}-->">
									<option value="">--</option>
									<!--{html_options options=$arrDay selected=$arrForm.search_eorderday.value}-->
									</select>日
	</td>
</tr>
<tr>
	<th>更新日</th>
	<td colspan="3">
	<span class="red"><!--{$arrErr.search_startyear}--></span>
	<span class="red"><!--{$arrErr.search_endyear}--></span>
									<select name="search_supdateyear"  style="<!--{$arrErr.search_supdateyear|sfGetErrorColor}-->">
									<option value="">----</option>
									<!--{html_options options=$arrRegistYear selected=$arrForm.search_supdateyear.value}-->
									</select>年
									<select name="search_supdatemonth" style="<!--{$arrErr.search_supdateyear|sfGetErrorColor}-->">
									<option value="">--</option>
									<!--{html_options options=$arrMonth selected=$arrForm.search_supdatemonth.value}-->
									</select>月
									<select name="search_supdateday" style="<!--{$arrErr.search_supdateyear|sfGetErrorColor}-->">
									<option value="">--</option>
									<!--{html_options options=$arrDay selected=$arrForm.search_supdateday.value}-->
									</select>日〜
									<select name="search_eupdateyear" style="<!--{$arrErr.search_eupdateyear|sfGetErrorColor}-->">
									<option value="">----</option>
									<!--{html_options options=$arrRegistYear selected=$arrForm.search_eupdateyear.value}-->
									</select>年
									<select name="search_eupdatemonth" style="<!--{$arrErr.search_eupdateyear|sfGetErrorColor}-->">
									<option value="">--</option>
									<!--{html_options options=$arrMonth selected=$arrForm.search_eupdatemonth.value}-->
									</select>月
									<select name="search_eupdateday" style="<!--{$arrErr.search_eupdateyear|sfGetErrorColor}-->">
									<option value="">--</option>
									<!--{html_options options=$arrDay selected=$arrForm.search_eupdateday.value}-->
									</select>日
	</td>
</tr>
<tr>
	<th>購入金額</th>
	<td colspan="3">
	<!--{assign var=key1 value="search_total1"}-->
	<!--{assign var=key2 value="search_total2"}-->
	<span class="red12"><!--{$arrErr[$key1]}--></span>
	<span class="red12"><!--{$arrErr[$key2]}--></span>
	<input type="text" name="<!--{$key1}-->" value="<!--{$arrForm[$key1].value|escape}-->" maxlength="<!--{$arrForm[$key1].length}-->" style="<!--{$arrErr[$key1]|sfGetErrorColor}-->" size="6" class="box6" />
	円 〜 
	<input type="text" name="<!--{$key2}-->" value="<!--{$arrForm[$key2].value|escape}-->" maxlength="<!--{$arrForm[$key2].length}-->" style="<!--{$arrErr[$key2]|sfGetErrorColor}-->" size="6" class="box6" />
	円
	</td>
</tr>
</table>
</div>
<!--検索条件設定テーブルここまで-->



<h3>検索結果表示件数<!--{assign var=key value="search_page_max"}-->
	<span class="red12"><!--{$arrErr[$key]}--></span>
	<select name="<!--{$arrForm[$key].keyname}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
	<!--{html_options options=$arrPageMax selected=$arrForm[$key].value}-->
	</select> 件
</h3>

<div class="btn_box">
<input type="submit" name="subm" value="この条件で検索する" />
</div>

</form>



<!--{if count($arrErr) == 0 and ($smarty.post.mode == 'search' or $smarty.post.mode == 'delete') }-->
<form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->">
<input type="hidden" name="mode" value="search">
<input type="hidden" name="order_id" value="">		
<!--{foreach key=key item=item from=$arrHidden}-->
<input type="hidden" name="<!--{$key}-->" value="<!--{$item|escape}-->">
<!--{/foreach}-->

<h3>検索結果一覧　<span class="reselt"><!--検索結果数--><!--{$tpl_linemax}-->件</span>&nbsp;が該当しました。</h3>

	<div class="searchit">
	<ul>
	<!--{if $smarty.const.ADMIN_MODE == '1'}-->
	<li><input type="button" name="subm" value="検索結果をすべて削除" onclick="fnModeSubmit('delete_all','','');" /></li>
	<!--{/if}-->
	<li>
	<a href="#" onclick="fnModeSubmit('csv','','');" >CSV DOWNLOAD</a>｜<a href="../contents/csv.php?tpl_subno_csv=order"> >>CSV出力項目設定</a>
	</li>
	</ul>
	</div>
	<!--{include file=$tpl_pager}-->



	<!--{if count($arrResults) > 0}-->
	<!--検索結果表示テーブル-->
	<div class="menuclass2">
	<table summary="検索結果一覧">
	<!--{* ペイジェントモジュール連携用 *}-->
	<!--{assign var=path value=`$smarty.const.MODULE_PATH`mdl_paygent/paygent_order_index.tpl}-->
		<!--{if file_exists($path)}-->
		<!--{include file=$path}-->
		<!--{else}-->
		<tr>
		<th>受注日</th><th>受注番号</th><th>顧客名</th><th>支払方法</th><th>購入金額(円)</th><th>全商品発送日</th><th>対応状況</th><th>帳票</th><th>編集</th><th>メール</th><th>削除</th>
		</tr>

		<!--{section name=cnt loop=$arrResults}-->
		<!--{assign var=status value="`$arrResults[cnt].status`"}-->
		<tr bgcolor="<!--{$arrORDERSTATUS_COLOR[$status]}-->">
			<td align="center"><!--{$arrResults[cnt].create_date|sfDispDBDate}--></td>
			<td align="center"><!--{$arrResults[cnt].order_id}--></td>
			<td><!--{$arrResults[cnt].order_name01|escape}--> <!--{$arrResults[cnt].order_name02|escape}--></td>
				<!--{assign var=payment_id value="`$arrResults[cnt].payment_id`"}-->
			<td align="center"><!--{$arrPayment[$payment_id]}--></td>
			<td align="right"><!--{$arrResults[cnt].total|number_format}--></td>
			<td align="center"><!--{$arrResults[cnt].commit_date|sfDispDBDate|default:"未発送"}--></td>
			<td align="center"><!--{$arrORDERSTATUS[$status]}--></td>
			<td align="center">
			<a href="./" onClick="win02('pdf.php?order_id=<!--{$arrResults[cnt].order_id}-->','pdf_input','500','650'); return false;">
			<span class="icon_class">帳票</span></a>
			</td>
			<td align="center">
			<a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnChangeAction('<!--{$smarty.const.URL_ORDER_EDIT}-->'); fnModeSubmit('pre_edit', 'order_id', '<!--{$arrResults[cnt].order_id}-->'); return false;">
			<span class="icon_edit">編集</span></a>
			</td>
			<td align="center">
			<a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnChangeAction('<!--{$smarty.const.URL_ORDER_MAIL}-->'); fnModeSubmit('pre_edit', 'order_id', '<!--{$arrResults[cnt].order_id}-->'); return false;">
			<span class="icon_mail">通知</span></a>
			</td>
			<td align="center">
			<a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnModeSubmit('delete', 'order_id', <!--{$arrResults[cnt].order_id}-->); return false;">
			<span class="icon_delete">削除</span></a>
			</td>
		</tr>
		<!--{/section}-->
		<!--{/if}-->
	</table>
	</div>
	<!--検索結果表示テーブル-->
	<!--{/if}-->

</form>
<!--{/if}-->
</div>
</div>
